package com.sq.universe.log.controller;

import com.sq.universe.base.entity.RespEntity;
import com.sq.universe.log.entity.LogCenterEntity;
import com.sq.universe.log.service.LogCenterService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/logCenter")
@CrossOrigin
@Api(description = "日志接口")
public class LogCenterController {

    @Autowired
    private LogCenterService logCenterService;

    /**
     * 查询所有的表
     * @return
     */
    @PostMapping("/receiveLog")
    @ResponseBody
    public RespEntity receiveLog(@RequestBody LogCenterEntity logCenterEntity){
        logCenterService.receiveLog(logCenterEntity);
        return new RespEntity("插入成功");
    }
}
